Repository navigation
Conversation
|
[Experimental Bot, please feedback here] No, this PR does not fully meet the NuttX requirements. Here's why and how to fix it:
Example of Improved PR Description: NuttShell (NSH) NuttX-12.8.0 NuttShell (NSH) NuttX-12.8.0 nsh> notedump 192.168.31.100 6666 (invalid server IP) nsh> notedump 192.168.31.9 6666 (with large amounts of trace data) By addressing these points, your PR will be much clearer, more complete, and more likely to be accepted. Remember to keep the language concise and focused on the technical details. |
c8beebf to
de11c70
Compare
Add example to send the trace data by udp Signed-off-by: Yang Wei <yangwei3@lixiang.com>
| PROGNAME = $(CONFIG_EXAMPLES_NOTEDUMP_PROGNAME) | ||
| PRIORITY = $(CONFIG_EXAMPLES_NOTEDUMP_PRIORITY) | ||
| STACKSIZE = $(CONFIG_EXAMPLES_NOTEDUMP_STACKSIZE) | ||
| MODULE = $(CONFIG_EXAMPLES_NOTEDUMP_) |
There was a problem hiding this comment.
| MODULE = $(CONFIG_EXAMPLES_NOTEDUMP_) | |
| MODULE = $(CONFIG_EXAMPLES_NOTEDUMP) |
| * Included Files | ||
| ****************************************************************************/ | ||
|
|
||
| #ifdef EXAMPLES_UDP_HOST |
There was a problem hiding this comment.
where is EXAMPLES_UDP_HOST define?
| static uint32_t g_udpserver_ipv4; | ||
| static uint32_t g_udpserver_port; | ||
| static uint32_t note_sent_bytes; |
There was a problem hiding this comment.
move all global variable to stack
|
|
||
| /* Now, sleep a bit. */ | ||
|
|
||
| sleep(1); |
There was a problem hiding this comment.
| sleep(1); |
maybe we could remove this sleep since read note_fd is block mode
| #ifdef CONFIG_EXAMPLES_UDP_IPv6 | ||
| # define AF_INETX AF_INET6 | ||
| # define PF_INETX PF_INET6 | ||
| #else | ||
| # define AF_INETX AF_INET | ||
| # define PF_INETX PF_INET | ||
| #endif |
There was a problem hiding this comment.
- Should we replace
EXAMPLES_UDP_IPv6withNET_IPv6? - Could you explain where are
AF_INETXandPF_INETXused for?
| default n | ||
| depends on SCHED_INSTRUMENTATION_DUMP && NET_UDP | ||
| ---help--- | ||
| Enable the Note dump example |
There was a problem hiding this comment.
Maybe the help text can include a short blurb about what the note dump example does? Something like: "This example reads data from the Note driver (/dev/note/ram) and sends it by UDP to the server-addr and server-port specified by command line arguments." WDYT?
Summary
Add a example to send the note trace data by udp
Usage:
Impact
Testing